package com.gengine.resource.loader
{
	import flash.display.*;
	import flash.events.*;
	
	public class SWFLoader extends BaseLoader
	{
		
		public function SWFLoader()
		{
			
		}
		
		override public function getClass() : Class
		{
			return SWFLoader;
		}
		
		override protected function onContentReady(param1:*) : Boolean
		{
			if (loaderInfo)
			{
				if (resourceInfo)
				{
					resourceInfo.data = loaderInfo;
				}
				loaderInfo.addEventListener(Event.UNLOAD, this.onUnloadHandler);
			}
			return param1 as Sprite != null;
		}
		
		private function onUnloadHandler(event:Event) : void
		{
			if (resourceInfo)
			{
				if (loaderInfo)
				{
					loaderInfo.removeEventListener(Event.UNLOAD, this.onUnloadHandler);
				}
			}
			
		}
		
		override public function dispose() : void
		{
			super.dispose();
			
		}
		
	}
}
